package com.example.demo.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author hweiyu
 * @Description
 * @Date 2022/6/27 11:29
 */
public class DateUtil {

    public static String format(Date date, String pattern) {
        SimpleDateFormat format = new SimpleDateFormat(pattern);
        return format.format(date);
    }
}
